package edu.ynu.se.xiecheng.achitectureclass.entity;
import edu.ynu.se.xiecheng.achitectureclass.common.entity.LogicEntity;
import lombok.Getter;
import lombok.Setter;
import org.hibernate.annotations.Where;

import javax.persistence.*;

@Entity
@Getter
@Setter
@Where(clause = "is_deleted = 0")
@Table(name = "air_temperature_data")
public class AirTemperatureDataEntity extends LogicEntity {

    @Column(nullable = false)
    private String sensorName;

    @Column(nullable = false)
    private String sensorNo;

    @Column(nullable = false)
    private Double dataValue;

    @Column(nullable = false)
    private String dataUnit;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "device_id", nullable = false)
    private DeviceEntity device;
}
